package com.example.micro.aop.login.utils;

import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;
import com.example.micro.aop.login.entity.User;

public class TokenUtil {

    public static String getToken(User user) {
        return JWT.create()
                .withAudience(user.getId(), user.getName())
                .sign(Algorithm.HMAC256(user.getPassword()));
    }

}
